import http from "@/utils/request";

/**
 * 文件上传
 */
export function uploadAPI(params) {
  return http.post("/admin/base/comm/upload", params, {
    headers: {
      "Content-Type": "multipart/form-data",
    },
  });
}

/**
 * 获取部门列表数据
 */
export function getSysDeptList() {
  return http.post("/admin/base/sys/department/list");
}

/**
 * 部门排序
 */
export function departmentOrder(params) {
  return http.post("/admin/base/sys/department/order", params);
}

/**
 * 获取角色分页数据
 */
export function getSysRolePage(params) {
  return http.post("/admin/base/sys/role/page", params);
}

/**
 * 获取角色列表数据
 */
export function getSysRoleList() {
  return http.post("/admin/base/sys/role/list");
}

/**
 * 新增角色
 */
export function addSysRole(params) {
  return http.post("/admin/base/sys/role/add", params);
}

/**
 * 更新角色
 */
export function updateSysRole(params) {
  return http.post("/admin/base/sys/role/update", params);
}

/**
 * 删除角色
 */
export function deleteSysRole(params) {
  return http.post("/admin/base/sys/role/delete", params);
}

/**
 * 获取菜单列表数据
 */
export function getSysMenuList() {
  return http.post("/admin/base/sys/menu/list");
}

/**
 * 获取系统用户分页数据
 */
export async function getSysUserPage(params) {
  return http.post("/admin/base/sys/user/page", params);
}

/**
 * 新增系统用户
 */
export function addSysUser(params) {
  return http.post("/admin/base/sys/user/add", params);
}

/**
 * 更新系统用户
 */
export function updateSysUser(params) {
  return http.post("/admin/base/sys/user/update", params);
}
